﻿using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AIVision.Model.MachineModels
{
    public class MachineStatusModel:BindableBase
    {
        private bool enableMonitor = true;

        public bool EnableMonitor
        {
            get { return enableMonitor; }
            set { enableMonitor = value; RaisePropertyChanged(); }
        }

        private bool resetLocationStatus;

        public bool ResetLocationStatus
        {
            get { return resetLocationStatus; }
            set { resetLocationStatus = value; RaisePropertyChanged(); }
        }

        private bool autoRunStatus;
		public bool AutoRunStatus
        {
			get { return autoRunStatus; }
			set { autoRunStatus = value; RaisePropertyChanged(); }
		}

        private bool emergencyStopXH;
        public bool EmergencyStopXH
        {
            get { return emergencyStopXH; }
            set { emergencyStopXH = value; RaisePropertyChanged(); }
        }

        private PPUStatusModel ppuStatus;
		public PPUStatusModel PPUStatus
		{
			get { return ppuStatus; }
			set { ppuStatus = value; RaisePropertyChanged(); }
		}

		private ZhuanTaiStatusModel zhuanTaiStatus;

		public ZhuanTaiStatusModel ZhuanTaiStatus
		{
			get { return zhuanTaiStatus; }
			set { zhuanTaiStatus = value; RaisePropertyChanged(); }
		}

		private TuLunStatusModel tuLunStatus;

		public TuLunStatusModel TuLunStatus
		{
			get { return tuLunStatus; }
			set { tuLunStatus = value; RaisePropertyChanged(); }
		}

		private ChaHeStatusModel chaHeStatus;

		public ChaHeStatusModel ChaHeStatus
		{
			get { return chaHeStatus; }
			set { chaHeStatus = value; RaisePropertyChanged(); }
		}

        private FeiLiaoStatusModel feiLiaoStatus;

        public FeiLiaoStatusModel FeiLiaoStatus
        {
            get { return feiLiaoStatus; }
            set { feiLiaoStatus = value; RaisePropertyChanged(); }
        }

        public MachineStatusModel(ZhuanTaiStatusModel zhuanTaiStatus,
			PPUStatusModel ppuStatus,TuLunStatusModel tuLunStatus,ChaHeStatusModel chaHeStatus,FeiLiaoStatusModel feiLiaoStatus)
		{
			this.ZhuanTaiStatus = zhuanTaiStatus;
			this.PPUStatus = ppuStatus;
			this.TuLunStatus = tuLunStatus;
			this.ChaHeStatus = chaHeStatus;
			this.FeiLiaoStatus = feiLiaoStatus;
        }

        private long runSpeed;

        public long RunSpeed
        {
            get { return runSpeed; }
            set { runSpeed = value; RaisePropertyChanged(); }
        }

        #region 转台上下料标记

        private bool okProductDownCompleteFlag;

        public bool OkProductDownCompleteFlag
        {
            get { return okProductDownCompleteFlag; }
            set { okProductDownCompleteFlag = value; RaisePropertyChanged(); }
        }

        private bool ngProductDownCompleteFlag;

        public bool NGProductDownCompleteFlag
        {
            get { return ngProductDownCompleteFlag; }
            set { ngProductDownCompleteFlag = value; RaisePropertyChanged(); }
        }

        #endregion

        //虚拟转台上料信号，用于收料
        private bool virtuallyZhuanTaiShangLiaoXH;
        public bool VirtuallyZhuanTaiShangLiaoXH
        {
            get { return virtuallyZhuanTaiShangLiaoXH; }
            set { virtuallyZhuanTaiShangLiaoXH = value;RaisePropertyChanged(); }
        }
        //虚拟信号累计数量
        private int virtuallyXHCount;
        public int VirtuallyXHCount
        {
            get { return virtuallyXHCount; }
            set { virtuallyXHCount = value; RaisePropertyChanged(); }
        }

        //检查完成信号
        private bool completeInspect;

        public bool CompleteInspect
        {
            get { return completeInspect; }
            set { completeInspect = value; RaisePropertyChanged(); }
        }


    }


}
